//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopLink, MinishopLinkResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopLinkList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopLinkResponse>(`/uctoo/minishop_link/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopLink = async (id: string) => {
  return requestClient.get<MinishopLink>(`/uctoo/minishop_link/${id}`);
};

export const adductooMinishopLink = async (data: Partial<MinishopLink>) => {
  return requestClient.post<MinishopLink>('/uctoo/minishop_link/add', data);
};

export const edituctooMinishopLink = async (data: Partial<MinishopLink>) => {
  return requestClient.post<MinishopLink>('/uctoo/minishop_link/edit', data);
};

export const deleteuctooMinishopLink = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_link/del', { id });
};
